home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / User Interface / Chiper's Listbox / Documentation < prev   
Text File  |  1999-08-06  |  3KB  |  40 lines

  1. Chiper's Listbox 1.0 Documentation
  2. First of all, let me give credit where credit is due.  This is originally based off a listbox class that I had recieved from Spht in MasterHotlineSocket, however it had numerous things that made it specific purpos only.  I realised that this could be very useful as a general purpose Listbox class.  Ok, now for the info:
  3.  
  4. Ground Rules:                                                                                                       .
  5. There are several properties of the control that must be set in order for the class to work.
  6. 1) Hierarichal must be set to true.  Something about how RealBasic draws rowpictures in non-hierarichal lists causes the selected row to have a white background.
  7. 2) RowHeight can not be smaller then 17, this is a RealBasic limitation on hierarichal lists.  If you set it below 17, CL will set it to 17.
  8. 3) InitialValue must be blank.  If you want to have any predefined rows, use the DefaultRows event.
  9. 4) Expand and Collapse row events have been removed, CL does not truely support hierarichal lists.
  10. 5) ColumnCount and ColumnWidths should be left default.  CL overrides any thing you put in these properties.  You can only have one column.
  11. 6) Do not touch RowPicture.  While it will not be overruled, it would be pointless to handle.  If you want a row icon, use the ChangeRow method.
  12. 7) CellType / ColumnType should not be changed.  If they are, it wont show through the row.
  13.  
  14. Properties:                                                                                                               .
  15. These can all only be set in the Setup event.
  16. backColor as color              Background color for the rows, defaults to appearance manager's fill color.
  17. separatorColor as color        Color for the separator between each row.
  18. selectedColor as color         Color of a row when selected, defaults to system highlightcolor.
  19. rowHeight as integer            Height of each row.
  20.  
  21. Events:                                                                                                                       .
  22. Setup
  23. This is the first event called when the control is opened, set any starting settings  in here.
  24.  
  25. DefaultRows
  26. This is called just after setup.  Due to the way CL works, you can't use the InitialValue property without causing the class to crash with an outofbounds error.  See the demo project to find out how to do this.
  27.  
  28. Methods:                                                                                                                   .
  29. These should all be rather self explanitory I think.
  30. NewRow      text as string, rowpicture as picture, rowcolor as color
  31. ChangeRow text as string, rowpicture as picture, rowcolor as color
  32.           Send nil in place of rowpicture if you don't want the row to have a picture.
  33. SelectRow  index as integer
  34. DeleteRow  index as integer
  35. RemoveAllRows
  36. SortRows
  37.  
  38. Chiper's Listbox © Jarvis Badgley, 1999
  39. http://www.macatawa.org/~chiper/
  40. chiper@macatawa.org